<?php
define('PER_PAGE',30);
define('_DB_','pro');

define('APP_DOMAIN','deployer.abcabc.com');
//define('WARNING_NOTIFICATION_EMAIL','');

/*
$_SERVER['MEMCACHED_SETS'] = array (
        '_' => array (
            array('localhost', 11212),
        ),
        'SESSION' => array (
            array('localhost', 11212),
        )
);*/
/*
$_SERVER['REDIS_SETS'] = array (
    '_' => array (
        array('host'=>'localhost','port'=> 6379),
    )
);*/

if(isset($_SERVER['REMOTE_ADDR'])){
	if(in_array($_SERVER['REMOTE_ADDR'],array('127.0.0.1')) || substr($_SERVER['REMOTE_ADDR'],0,8)=='192.168.')
	{
		error_reporting(E_ALL & ~E_NOTICE & ~ E_STRICT);
	}else
	{
		error_reporting(0);
	}
}
error_reporting(E_ALL & ~E_NOTICE & ~ E_STRICT);
if(isset($argv))
{
	$_SERVER['DOCUMENT_ROOT'] = realpath(dirname(__FILE__).'/../../').DIRECTORY_SEPARATOR.APP_NAME;
	if(isset($argv))
	{
		$ini = parse_ini_file(ROOT_PATH.'/src/config/ENV_CONFIG_'.$argv[1]);
		foreach($ini as $k=>$v)
		{
			$_SERVER[$k]=$v;
		}
	}
	error_reporting(E_ALL & ~E_NOTICE & ~ E_STRICT);
}else{
	$_SERVER['ENV_APPLOGS_DIR'] = '/mnt/disk-b/www/applogs/deployer';
	$_SERVER['ENV_DATA_DIR'] = '/mnt/disk-b/data/www/deployer';
	$_SERVER['READONLY_MODE'] = 0;
	$_SERVER['DOCUMENT_ROOT'] = ROOT_PATH.DIRECTORY_SEPARATOR.APP_NAME;
	
	if(_DB_ == 'pro'){
		$_SERVER['ENV_DB_HOST'] = '127.0.0.1';
		$_SERVER['ENV_DB_PORT'] = '3306';
		$_SERVER['ENV_DB_USER'] = 'deployer';
		$_SERVER['ENV_DB_PASS'] = '123123';
		$_SERVER['ENV_DB_NAME'] = 'deployer';
	}
	$_SERVER['CAPTCHA_FONT_FILE'] = ROOT_PATH.'/src/application/models/bizdomain/knowledge/verdana.ttf';
}


